#include <stdlib.h>
#include <stdio.h>
int main() {
    const char * str = "1000";
    float a = atof(str);
    int a1 = atoi(str);

    const char * str2 = "abc";
    float b = atof(str2);
    int b1 = atoi(str2);

    printf("a = %f, b = %f, a1 = %d, b1 = %d\n", a, b, a1, b1);
    // 输出：a = 1000.000000, b = 0.000000, a1 = 1000, b1 = 0
    return 0;
}